class Soup {
    private String s;

    Soup() {
        System.out.println("Soup()");
        s = "constructed";
    }

    @Override
    public String toString() {
        return s;
    }
}

public class ReferenceInitialization {
    private String s1="Happy", s2 = "Happy", s3, s4;
    private Soup castile;
    private int i;
    private float toy;
    public ReferenceInitialization() {
        System.out.println("Inside ReferenceInitialization");
        s3 = "Joy";
        toy = 1.1f;
        castile = new Soup();
    }

    @Override
    public String toString() {
        if (s4 == null) {
            s4 = "Jack";
        }
        return  "s1 = " + s1 + " s2 = " + s2 + " s3 = " + s3 + " s4 = " + s4 +
                " i = " + i + " toy = " + toy +
                " castile = " + castile;
    }

    public static void main(String[] args) {
        ReferenceInitialization ri = new ReferenceInitialization();
        System.out.println(ri);
    }
}
